<!--
 * @name: 
 * @Author: 刘大可
 * @Date: 2023-06-25 16:13:02
 * @LastEditors: 刘大可
 * @LastEditTime: 2023-07-04 11:48:29
-->
<template>
    <view class="index">
        <!-- <web-view :src="url+'&token='+token" v-if="token"/> -->
            <web-view :src="url + '&token=' + token" v-if="token"/>
    </view>
</template>

<script>
import Vue from 'vue';
import siteInfo from '@/siteinfo.js';

export default Vue.extend({
    components: {},
    data() {
        return {
            url:"",
            token:"",
        }
    },
    computed: {},
    methods: {
      
    },
    watch: {},

    // 页面周期函数--监听页面加载
    async onLoad() {
       
    },
    // 页面周期函数--监听页面初次渲染完成
    onReady() { },
    // 页面周期函数--监听页面显示(not-nvue)
    async onShow() { 

        await this.login().then((res) => {
            console.log("您已登陆！");
        })


        let url = this.fileUrl.split("wximages/")[0]
        // url="http://localhost:8080/"
        this.url = url + "chat/#/?wxapp_id=" + siteInfo.uniacid
        // this.url = url + "chat/#/pages/index/copy?wxapp_id=" + siteInfo.uniacid
        this.token = uni.getStorageSync('token')

    },
    // 页面周期函数--监听页面隐藏
    onHide() { },
    // 页面周期函数--监听页面卸载
    onUnload() { },
    // 页面处理函数--监听用户下拉动作
    // onPullDownRefresh() { uni.stopPullDownRefresh(); },
    // 页面处理函数--监听用户上拉触底
    onReachBottom() {
        this.page += 1
        this.getList()
    },
    // 页面处理函数--监听页面滚动(not-nvue)
    // onPageScroll(event) {},
    // 页面处理函数--用户点击右上角分享
    // onShareAppMessage(options) {},
}) 
</script>

<style scoped lang="scss">	
</style>